package org.example.Thread01;

public class Dome_Thread05 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(()->{
            for(int i=0;i<1000000000l;i++) {
                //啥也不干
            }
        });
        //启动之前看一下进程的状态
        System.out.println("启动之前："+t1.getState());
        //启动线程
        t1.start();
        //启动之后
        System.out.println("启动之后："+t1.getState());
        //等待线程结束
        t1.join();
        //线程结束之后
        System.out.println("结束之后："+t1.getState());
    }
}
